package com.pikaqiu.warehouse.domain.dto;

import com.pikaqiu.warehouse.domain.entity.Materials;
import com.pikaqiu.warehouse.domain.entity.Products;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @Author: Administrator
 * @Date: 2024/8/15
 */
@Data
public class CategoryGroupContentDto {
    private Integer id;
    private Integer category;
    private String name;
    private String desc;
    private BigDecimal stock;
    private String unit;
    private BigDecimal salary;
    private BigDecimal price;
    private String image;

    public CategoryGroupContentDto(Products products) {
        this.id = products.getId();
        this.category = products.getCategory();
        this.name = products.getName();
        this.desc = products.getDescription();
        this.image = products.getImages();
        this.salary = products.getSalary();
        this.price = products.getPrice();
        this.stock = products.getStock();
        this.unit = products.getUnit();
    }

    public CategoryGroupContentDto(Materials materials) {
        this.id = materials.getId();
        this.category = materials.getCategory();
        this.name = materials.getName();
        this.desc = materials.getDescription();
        this.image = materials.getImages();
        this.stock = materials.getStock();
        this.unit = materials.getUnit();
    }
}
